import request from "../utils/request";
import { loginDataType } from '../interface'

export const apiLogin = (data:loginDataType) => {
    return request({
        url: '/api/login',
        method: 'post',
        data
    })
}

// 获取用户信息
export const apigetUserInfo = () => {
    return request({
        url: '/api/getUserInfo',
    })
}

// 获取list数据
export const apigetList = (data: { current: string | number }) => {
    return request({
        url: '/api/getList',
        method: 'post',
        data
    })
}

// 详情页
export const apigetDetail = (data: {id: string | number}) => {
    return request({
        url: '/api/getDetail',
        method: 'post',
        data
    })
}